<?php
apf_require_class("Bll_BLL");

class Bll_Attendance_UserKqStatus extends BLL{


    /**
     * 获取上一天所有员工初始记录
     */
    public function get_user_day_status(){
        $result = array();
        $date = date('Ymd',time()-24*60*60);
        $where = array('dateline'=>$date);
        if(empty($where)) {
            return $result;
        }
        $result = $this->get_deault_dao()->find($where,'user_id asc',0,0);
        return $result;
    }
    public function get_user_one_day_status($user_id,$date){
        $where = array();
        $where['user_id'] = $user_id;
        $where['dateline'] = $date;
        $result = $this->get_deault_dao()->find($where,'',0,0);
        return $result[0];
    }
    private function get_deault_dao(){
        return $this->get_dao('DAO_Attendance_UserKqStatus');
    }

}
